package com.ruoyi.qbms.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.qbms.mapper.QbmsRecordNoteMapper;
import com.ruoyi.qbms.domain.QbmsRecordNote;
import com.ruoyi.qbms.service.IQbmsRecordNoteService;

/**
 * 题库笔记记录Service业务层处理
 * 
 * @author zouhuu
 * @date 2022-10-19
 */
@Service
public class QbmsRecordNoteServiceImpl implements IQbmsRecordNoteService 
{
    @Autowired
    private QbmsRecordNoteMapper qbmsRecordNoteMapper;

    /**
     * 查询题库笔记记录
     * 
     * @param id 题库笔记记录主键
     * @return 题库笔记记录
     */
    @Override
    public QbmsRecordNote selectQbmsRecordNoteById(Long id)
    {
        return qbmsRecordNoteMapper.selectQbmsRecordNoteById(id);
    }

    /**
     * 查询题库笔记记录列表
     * 
     * @param qbmsRecordNote 题库笔记记录
     * @return 题库笔记记录
     */
    @Override
    public List<QbmsRecordNote> selectQbmsRecordNoteList(QbmsRecordNote qbmsRecordNote)
    {
        return qbmsRecordNoteMapper.selectQbmsRecordNoteList(qbmsRecordNote);
    }

    /**
     * 查询数量
     * @param qbmsRecordNote
     * @return
     */
    @Override
    public int selectNums(QbmsRecordNote qbmsRecordNote) {
        return qbmsRecordNoteMapper.selectNums(qbmsRecordNote);
    }

    /**
     * 新增题库笔记记录
     * 
     * @param qbmsRecordNote 题库笔记记录
     * @return 结果
     */
    @Override
    public int insertQbmsRecordNote(QbmsRecordNote qbmsRecordNote)
    {
        qbmsRecordNote.setCreateTime(DateUtils.getNowDate());
        return qbmsRecordNoteMapper.insertQbmsRecordNote(qbmsRecordNote);
    }

    /**
     * 修改题库笔记记录
     * 
     * @param qbmsRecordNote 题库笔记记录
     * @return 结果
     */
    @Override
    public int updateQbmsRecordNote(QbmsRecordNote qbmsRecordNote)
    {
        qbmsRecordNote.setUpdateTime(DateUtils.getNowDate());
        return qbmsRecordNoteMapper.updateQbmsRecordNote(qbmsRecordNote);
    }

    /**
     * 批量删除题库笔记记录
     * 
     * @param ids 需要删除的题库笔记记录主键
     * @return 结果
     */
    @Override
    public int deleteQbmsRecordNoteByIds(Long[] ids)
    {
        return qbmsRecordNoteMapper.deleteQbmsRecordNoteByIds(ids);
    }

    /**
     * 删除题库笔记记录信息
     * 
     * @param id 题库笔记记录主键
     * @return 结果
     */
    @Override
    public int deleteQbmsRecordNoteById(Long id)
    {
        return qbmsRecordNoteMapper.deleteQbmsRecordNoteById(id);
    }
}
